import React, { Component } from 'react';
import {
    TouchableOpacity,
    Text,
    Image,
    View
} from 'react-native';
import Style from './Style.js';

export default class TypeButton extends Component {
    render() {
        return (
            <TouchableOpacity onPress={this.props.onPress}>
                <View style={Style.typeItemContainer}>
                    <Image source={this.props.image} style={Style.typeItemImage}/>
                    <Text style={Style.typeItemText}>{this.props.value}</Text>
                </View>
            </TouchableOpacity>
        );
    }
}
